V2EX  ›  英汉词典
Enqueued related words: Currying

Higher-order function

释义 Definition

高阶函数:在编程中,指把函数当作数据来使用的函数——它可以接收函数作为参数,和/或返回一个函数。常见于函数式编程,也在 JavaScript、Python 等语言中广泛使用。(在数学里也有相关概念,但此处以编程语境为主。)

例句 Examples

A higher-order function can take another function as an argument.
高阶函数可以把另一个函数作为参数传入。

By composing higher-order functions like map and filter, we can express complex data processing in a clear, declarative style.
通过组合 mapfilter 等高阶函数,我们可以用清晰、声明式的方式表达复杂的数据处理流程。

发音 Pronunciation (IPA)

/ˌhaɪər ˈɔːrdər ˈfʌŋkʃən/

词源 Etymology

higher-order 源自数学与逻辑学中的“阶(order)”概念:当一个对象的“输入/作用对象”本身也是某种对象时,就会被称为更高的“阶”。在编程里,first-class function(函数是一等公民)的思想使得函数可以被传递与返回,于是出现了 higher-order function(高阶函数) 这一术语,用来描述“操作函数的函数”。

相关词 Related Words

文学与经典作品 Literary / Notable Works

  • Structure and Interpretation of Computer Programs(SICP)——用大量例子讲解用高阶函数抽象控制结构与数据处理。
  • The Little Schemer ——通过递归与高阶函数引导读者理解函数式思维。
  • Programming in Haskell(Graham Hutton)——系统介绍以高阶函数为核心的函数式编程模式。
  • Learn You a Haskell for Great Good! ——以通俗风格展示 mapfold 等高阶函数的用法。
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   691 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 14ms · UTC 20:27 · PVG 04:27 · LAX 12:27 · JFK 15:27
♥ Do have faith in what you're doing.